import { getRequest, postRequest, putRequest, deleteRequest } from '/@/lib/axios';

/**
 * 流程表单相关的 API 接口集合
 */

export const formApi = {
  // 查询流程表单列表
  listForm: (query) => postRequest('/workflow/form/list', query),
  // 查询流程表单详细
  getForm: (formId) => getRequest('/workflow/form/' + formId),
  // 根据流程Key查询流程表单
  getFormByProcKey: (procKey) => getRequest('/workflow/form/procKey/' + procKey),
  // 新增流程表单
  addForm: (data) => postRequest('/workflow/form', data),
  // 修改流程表单
  updateForm: (data) => putRequest('/workflow/form', data),
  // 删除流程表单
  delForm: (formId) => deleteRequest('/workflow/form/' + formId),
};
